import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/0',
    name: 'ooooo',
    component: () => import('@/views/index')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login')
  },
  {
    path: '/smslogin',
    name: 'Smslogin',
    component: () => import('@/views/login/smslogin')
  },
  {
    path: '/setpass',
    name: 'setpass',
    component: () => import('@/views/login/setpass')
  },
  {
    path: '/teacher-detail',
    name: 'teacher-detail',
    component: () => import('@/views/detail/teacher-detail')
  },
  {
    path: '/course-detail',
    name: 'course-detail',
    component: () => import('@/views/course/course-detail')
  },
  {
    path: '/logout',
    name: 'logout',
    component: () => import('@/views/logout')
  },
  {
    path: '/set-new-pass',
    name: 'set-new-pass',
    component: () => import('@/views/main/set-new-pass')
  },
  {
    path: '/info',
    name: 'info',
    component: () => import('@/views/main/info')
  },
  {
    path: '/concern',
    name: 'concern',
    component: () => import('@/views/main/concern')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('@/views/search')
  },
  {
    path: '/set-info',
    name: 'setinfo',
    component: () => import('@/views/main/set-info')
  },
  {
    path: '/',
    component: () => import('@/views/layouts'),
    redirect: '/index',
    children: [{
        path: '/index',
        name: 'Index',
        component: () => import('@/views/index'),
      },
      {
        path: '/course',
        name: 'Course',
        component: () => import('@/views/course'),
      },
      {
        path: '/record',
        name: 'Record',
        component: () => import('@/views/record'),
      },
      {
        path: '/practice',
        name: 'Practice',
        component: () => import('@/views/practice'),
      },
      {
        path: '/main',
        name: 'Main',
        component: () => import('@/views/main'),
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router